package com.yurun.employeemodule.mapper;

import java.math.BigInteger;
import java.util.List;

import com.yurun.commonapi.pojo.Classroom;
import com.yurun.commonapi.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 *
 *@author lihao
 *@mail lihaohaocn@gmail.com
 *@Date 2021/8/11 3:45 下午
 */


@Mapper
@Repository
public interface EmployeeMapper {
    Employee getEmployeeById(@Param("employeeId") BigInteger employeeId);

    List<Employee> getEmployeeByName(@Param("organizationId") BigInteger organizationId, @Param("employeeName") String employeeName);

    List<Employee> getBranchEmployeeInfo(@Param("organizationId") BigInteger organizationId,@Param("branchId") BigInteger branchId);

    List<Employee> getEmployeeByIdAndName(@Param("organizationId") BigInteger organizationId, @Param("employeeName") String employeeName, @Param("branchId") BigInteger branchId);

    List<Employee> getAllEmployeeInfo(BigInteger organizationId);

    int delEmployeeById(Employee employee);

    // 新增员工前查重
    Integer verifyEmployeeIdIsRepeat(BigInteger employeeId);

    int addEmployee(Employee employee);

    // 新增角色前查重
    int verifyRoleIsRepeat(BigInteger employeeId);

    int addEmployeeRole(Employee employee);

    int editEmployee(Employee employee);

    // 重置员工密码
    int resetEmployeePwd(Employee employee);

    int delTeacherByEmployeeId(BigInteger employeeId);

    String getEmployeePosition(BigInteger employeeId);

    List<Integer> getAdminAllPermission(int categoryId);

    List<Integer> getRoleList(BigInteger employeeId);

    int editEmployeePwd(Employee employee);

    String getEmployeePwd(BigInteger employeeId);

    Classroom getOneClassroomInfo(BigInteger classroomId);
}
